import {
  createRouter as _createRouter,
  createWebHistory,
  createMemoryHistory,
} from 'vue-router';
import { isServer } from '@/utils/is';
import { routes } from './routes';

export function createRouter() {
  return _createRouter({
    history: isServer() ? createMemoryHistory() : createWebHistory(),
    routes,
  });
}
